package com.treasure.mall.biz.entity.embeddable;

import com.treasure.mall.biz.entity.product.CategoryPO;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 *
 * +---------------------------------------------------------
 * * @package: com.treasure.mall.biz.entity.embeddable
 * * @author: guomw (guomwchen@foxmail.com)
 * * @date: 2020/6/12 17:34
 * * @since: V1.0.0
 * +---------------------------------------------------------
 * 注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的
 * Copyright 2019-2022 com.treasure.mall.biz.entity.embeddable Inc. All rights reserved.
 */
@Embeddable
@Data
public class MerchantData implements Serializable {
    private static final long serialVersionUID = -7660098795911700992L;
    /**
     * logo
     */
    @Column(name = "avatar")
    private String avatar;
    /**
     * 店铺背景图
     */
    @Column(name = "background_image")
    private String backgroundImage;
    /**
     * 店铺标题(15)
     */
    @Column(length = 20)
    private String title;
    /**
     * 店铺标题(30)
     */
    @Column(length = 50)
    private String description;
    /**
     * 店铺微信号
     */
    @Column(length = 32)
    private String wechatAccount;

    /**
     * 联系人方式
     */
    @Column(length = 15)
    private String contactWay;

    /***
     * 退货地址
     */
    private ReceivingInfo returnedPurchase;

    @ManyToOne
    @JoinColumn(name = "main_category_id", foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
    private CategoryPO mainCategory;
}
